package org.desktop.web.client.project.service;

import org.desktop.web.shared.domain.entities.Project;
import org.desktop.web.shared.domain.entities.SubProject;

import com.google.gwt.user.client.rpc.AsyncCallback;
import com.sencha.gxt.data.shared.loader.PagingLoadConfig;
import com.sencha.gxt.data.shared.loader.PagingLoadResult;

public interface ProjectServiceAsync{

	void getProjects(String token, PagingLoadConfig loadConfig,
			AsyncCallback<PagingLoadResult<Project>> callback);
	
	void getSubProjectsByIdProject(String token,String idProject, PagingLoadConfig loadConfig,
			AsyncCallback<PagingLoadResult<SubProject>> callback );

	void saveSubProject(String token,int idProject, SubProject sub,
			AsyncCallback<Boolean> asyncCallback);

	void saveProject(Project project, AsyncCallback<Boolean> asyncCallback);

	void deleteSubProject(int id, AsyncCallback<Boolean> asyncCallback);

	void deleteProject(Project selectedItem,
			AsyncCallback<Boolean> asyncCallback);

}
